﻿using Company.Axis;
using Prism.Ioc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Company.Config
{
    /// <summary>
    /// 配置模块
    /// </summary>
    public class CompanyConfigModule : IModule
    {
        public void OnInitialized(IContainerProvider containerProvider)
        {
            //var test = containerProvider.Resolve<ConfigProvider>();
        }

        public void RegisterTypes(IContainerRegistry containerRegistry)
        {
            containerRegistry.Register<ConfigService<AxisConfig>>();
            if (!containerRegistry.IsRegistered<ConfigProvider>())
            {
                containerRegistry.RegisterSingleton<ConfigProvider>();
            }
        }
    }
}
